<!DOCTYPE html>
<!--改造为动态为网页-->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>精美商品</title>
    <link rel="stylesheet" type="text/css" href="/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="/css/success.css"/>
</head>
<body>
<div class="wrap">
    <!-- 欢迎部分 -->
    <div class="welcome">
        <!--回登录页-->
        <a href="/"><img src="/images/logo.png"></a>欢迎光临：<span th:text="${username}" style="color:red"></span>
    </div>
    <div class="tips">商品列表</div>
    <ul class="goods_name clearF">
        <li>商品信息</li>
        <li>库存</li>
        <li>单价</li>
        <li>购买数量</li>
        <li>金额</li>
    </ul>
    <!-- 以下实现了一个简单购物支付功能,javascipt:void(0)更多的操作需要我们优化,此处要调用动作-->
    <form class="buy_frm" action="" method="post">
        <table border="0" cellspacing="0" cellpadding="0">
            <!--<tr th:each="product,productStat:${products}">-->
            <!-- thyemleaf遍历商品的套路 -->
            <tr>
                <!--此处的串接非常重要,要领会-->
                <td class="detail"><img src=""/>
                    <span class="info">describe</span>
                    <input type="hidden"  name="pc" value="0"/>
                </td>
                <!--库存数-->
                <td class="stock">0</td>
                <!--一般价格-->
                <td class="price">20</td>
                <!--计数-->
                <td class="number"><button class="btnLeft" type="button">-</button><span class="num">0</span>
                    <button class="btnRight" type="button">+</button>
                    <!--更新库存数,请实现-->
                    <input type="hidden" class="subc" name="subc" value="0">
                </td>

                <td class="money">0</td>
            </tr>
        </table>
        <div class="total">商品总价:&ensp;<b>&yen;</b><span>0.0</span></div>
        <!--显示最新的帐户余额-->
        <div class="money">当前余额:&ensp;<b>&yen;</b><span >0.0</span>
            <input type="hidden" name="username">
            <!--通过js再传入商品总价到后台去更新额-->
            <input type="hidden" name="total" id="total">
        </div>
        <div class="buy"><input type="submit" value="确认购买"/></div>
    </form>
</div>
</body>
<script src="/js/jqmin.js"></script>
<script src="/js/success.js"></script>
</html>
